package com.itcncp.wechat.app.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class UserInvoiceOpJnl implements Serializable {
    /**
     * 发票流水号
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long invoiceNo;

    /**
     * 用户id
     *
     * @mbg.generated
     */
    private String userId;

    /**
     * 发票号
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long invoiceId;

    /**
     * 开票行程计数
     *
     * @mbg.generated
     */
    private String tripCnt;

    /**
     * 开票充值开始时间，从充值流水表中获取时间值
     *
     * @mbg.generated
     */
    private Date beginTime;

    /**
     * 开票流水结束时间，从充值流水表中获取时间值
     *
     * @mbg.generated
     */
    private Date endTime;

    /**
     * 开票金额
     *
     * @mbg.generated
     */
    private BigDecimal invoiceAmount;

    /**
     * 快递单号
     *
     * @mbg.generated
     */
    private String expressNo;

    /**
     * 快递公司
     *
     * @mbg.generated
     */
    private String expressCompany;

    /**
     * 开票状态 1、已开 2、已寄出 3、已签收
     *
     * @mbg.generated
     */
    private Byte invoiceState;

    /**
     * 开票时间
     *
     * @mbg.generated
     */
    private Date invoiceDate;

    /**
     * 发票抬头
     *
     * @mbg.generated
     */
    private String invoiceRise;

    /**
     * 纳税人识别号
     *
     * @mbg.generated
     */
    private String invoiceIdent;

    /**
     * 发件收件人
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 手机号
     *
     * @mbg.generated
     */
    private String addrTel;

    /**
     * 发票收件地址
     *
     * @mbg.generated
     */
    private String area;

    /**
     * 发票收件详细地址
     *
     * @mbg.generated
     */
    private String address;


    private String remark;
    private static final long serialVersionUID = 1L;

    public Long getInvoiceNo() {
        return invoiceNo;
    }

    public void setInvoiceNo(Long invoiceNo) {
        this.invoiceNo = invoiceNo;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Long getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(Long invoiceId) {
        this.invoiceId = invoiceId;
    }

    public String getTripCnt() {
        return tripCnt;
    }

    public void setTripCnt(String tripCnt) {
        this.tripCnt = tripCnt;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getInvoiceAmount() {
        return invoiceAmount;
    }

    public void setInvoiceAmount(BigDecimal invoiceAmount) {
        this.invoiceAmount = invoiceAmount;
    }

    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }

    public String getExpressCompany() {
        return expressCompany;
    }

    public void setExpressCompany(String expressCompany) {
        this.expressCompany = expressCompany;
    }

    public Byte getInvoiceState() {
        return invoiceState;
    }

    public void setInvoiceState(Byte invoiceState) {
        this.invoiceState = invoiceState;
    }

    public Date getInvoiceDate() {
        return invoiceDate;
    }

    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getInvoiceRise() {
        return invoiceRise;
    }

    public void setInvoiceRise(String invoiceRise) {
        this.invoiceRise = invoiceRise;
    }

    public String getInvoiceIdent() {
        return invoiceIdent;
    }

    public void setInvoiceIdent(String invoiceIdent) {
        this.invoiceIdent = invoiceIdent;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddrTel() {
        return addrTel;
    }

    public void setAddrTel(String addrTel) {
        this.addrTel = addrTel;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", invoiceNo=").append(invoiceNo);
        sb.append(", userId=").append(userId);
        sb.append(", invoiceId=").append(invoiceId);
        sb.append(", tripCnt=").append(tripCnt);
        sb.append(", beginTime=").append(beginTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", invoiceAmount=").append(invoiceAmount);
        sb.append(", expressNo=").append(expressNo);
        sb.append(", expressCompany=").append(expressCompany);
        sb.append(", invoiceState=").append(invoiceState);
        sb.append(", invoiceDate=").append(invoiceDate);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserInvoiceOpJnl other = (UserInvoiceOpJnl) that;
        return (this.getInvoiceNo() == null ? other.getInvoiceNo() == null : this.getInvoiceNo().equals(other.getInvoiceNo()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getInvoiceId() == null ? other.getInvoiceId() == null : this.getInvoiceId().equals(other.getInvoiceId()))
            && (this.getTripCnt() == null ? other.getTripCnt() == null : this.getTripCnt().equals(other.getTripCnt()))
            && (this.getBeginTime() == null ? other.getBeginTime() == null : this.getBeginTime().equals(other.getBeginTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getInvoiceAmount() == null ? other.getInvoiceAmount() == null : this.getInvoiceAmount().equals(other.getInvoiceAmount()))
            && (this.getExpressNo() == null ? other.getExpressNo() == null : this.getExpressNo().equals(other.getExpressNo()))
            && (this.getExpressCompany() == null ? other.getExpressCompany() == null : this.getExpressCompany().equals(other.getExpressCompany()))
            && (this.getInvoiceState() == null ? other.getInvoiceState() == null : this.getInvoiceState().equals(other.getInvoiceState()))
            && (this.getInvoiceDate() == null ? other.getInvoiceDate() == null : this.getInvoiceDate().equals(other.getInvoiceDate()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }


    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInvoiceNo() == null) ? 0 : getInvoiceNo().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getInvoiceId() == null) ? 0 : getInvoiceId().hashCode());
        result = prime * result + ((getTripCnt() == null) ? 0 : getTripCnt().hashCode());
        result = prime * result + ((getBeginTime() == null) ? 0 : getBeginTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getInvoiceAmount() == null) ? 0 : getInvoiceAmount().hashCode());
        result = prime * result + ((getExpressNo() == null) ? 0 : getExpressNo().hashCode());
        result = prime * result + ((getExpressCompany() == null) ? 0 : getExpressCompany().hashCode());
        result = prime * result + ((getInvoiceState() == null) ? 0 : getInvoiceState().hashCode());
        result = prime * result + ((getInvoiceDate() == null) ? 0 : getInvoiceDate().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }
}